package com.dongzili.easyes.custom.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.dromara.easyes.annotation.*;
import org.dromara.easyes.annotation.rely.FieldType;

import java.time.LocalDateTime;

/**
* 资源_目录 关联表
* @TableName s_relation
*/
@Data
@TableName(value ="s_relation")
@Settings(maxResultWindow = 100000000)
@IndexName(value = "s_relation")
public class SRelationModel {
	
	@IndexId(type = org.dromara.easyes.annotation.rely.IdType.CUSTOMIZE)
    @TableId(value="`ID`", type = IdType.AUTO)
    private Long id;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`ResCode`")
    private String resCode;

    @TableField("`TbCatalogID`")
    private Integer tbCatalogID;

    @TableField("`TbCatalogPath`")
    private String tbCatalogPath;

    @TableField("`TbCatalogPaths`")
    private String tbCatalogPaths;

    @TableField("`VersionID`")
    private Integer versionID;

    @TableField("`VersionName`")
    private String versionName;

    @TableField("`LibraryID`")
    private Integer libraryID;

//    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`LibraryName`")
    private String libraryName;

    @TableField("`ResTypeID`")
    private Integer resTypeID;

    @TableField("`ResTypeName`")
    private String resTypeName;

    @TableField("`ResTypePID`")
    private Integer resTypePID;

    @TableField("`TermID`")
    private Integer termID;

    @TableField("`TermName`")
    private String termName;

    @TableField("`SubjectID`")
    private Integer subjectID;

    @TableField("`SubjectName`")
    private String subjectName;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`Format`")
    private String format;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`FormatName`")
    private String formatName;

    @TableField("`DLoadTimes`")
    private Integer dLoadTimes;

    @TableField("`ShareTimes`")
    private Integer shareTimes;

    @TableField("`ClickTimes`")
    private Integer clickTimes;

    @TableField("`SCTimes`")
    private Integer sCTimes;

    @IndexField( fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("`CreateTime`")
    private LocalDateTime createTime;

    @TableField("`IsValid`")
    private Integer isValid;

    @TableField("`Flag`")
    private Integer flag;

    @TableField("`ResTypePName`")
    private String resTypePName;

    @TableField("`TbCatalogCode`")
    private String tbCatalogCode;

    @IndexField(fieldType = FieldType.KEYWORD, fieldData = true)
    @TableField("`ResYear`")
    private String resYear;

    @TableField("`ShowOrder`")
    private Integer showOrder;

    @TableField("`IsGoodRes`")
    private Integer isGoodRes;

    @TableField("`ResName`")
    private String resName;

    @TableField("`ResType`")
    private Integer resType;

    @TableField("`OrgID`")
    private Integer orgID;

    @TableField("`IsXBRes`")
    private Integer isXBRes;

    /**
    * 更新时间
    */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("`modify_time`")
    @IndexField( fieldType = FieldType.DATE, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime modifyTime;


    /**
    * 匹配度
    */
    @Score
    @IndexField(exist = false)
    @TableField(exist = false)
    private Float matchScore;



}
